{extend name="admin/public:layout" /}
{block name="title"}企业库管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 企业管理</a></li>
                <li class="active">添加企业</li>
            </ol>
        </div>
        <div class="ibox-content">
            <form method="post" class="form-horizontal" id="form">
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">企业名称</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入企业名称"
                               name="company_name" value="" datatype="*" />
                    </div>
                    <label class="col-sm-2 control-label Validform_label">营业执照号</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入营业执照号"
                               name="company_no" value="" datatype="*" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">所属部门</label>
                    <div class="col-sm-4">
                        <select name="dept_id" class="form-control" datatype="*">
                            <option value="0">请选择</option>
                            {volist name="deptTree" id="vo"}
                            {gt name="adminInfo.admin_power" value="1"}
                            {eq name="adminInfo.dept_id" value="$vo.dept_id"}
                            <option value="{$vo.dept_id}">{$vo._name}</option>
                            {/eq}
                            {else}
                            <option value="{$vo.dept_id}">{$vo._name}</option>
                            {/gt}
                            {/volist}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">营业执照</label>
                    <div class="col-sm-4">
                        <p class="form-control-static">
                            {:widget('common/Form/singleImg',['company_img','',-2])}
                        </p>
                    </div>
                    <label class="col-sm-2 control-label Validform_label">企业logo</label>
                    <div class="col-sm-4">
                        <p class="form-control-static">
                            {:widget('common/Form/singleImg',['company_logo','',-2])}
                        </p>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">电话</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入企业电话"
                               name="company_tel" value="" />
                    </div>
                </div>
                <div class="form-group form-inline">
                    <label class="col-sm-2 control-label Validform_label">地区</label>
                    <div class="col-sm-4">
                        {:widget('common/Form/areaName',['company_prov,company_city,company_dist'])}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label Validform_label">地址</label>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" placeholder="请输入企业详细地址"
                               name="company_address" value="" />
                    </div>
                </div>
                <div class="form-group ">
                    <label class="col-sm-2 control-label Validform_label">主营业务</label>
                    <div class="col-sm-8">
                        <textarea name="company_intro"  class="form-control" id="" cols="30" rows="10"></textarea>
                    </div>
                </div>
                <div class="form-group ">
                    <label class="col-sm-2 control-label Validform_label">企业简介</label>
                    <div class="col-sm-8">
                        {:widget('common/Form/ueditor',['content','','-2'])}
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button class="btn btn-primary" type="button" id="btnSub">保存内容</button>
                        <a href="{:url('index')}" class="btn btn-white">取消</a>
                        <span id="validError"></span>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    })
</script>
{/block}